Skip to content

Add per-jurisdiction tax profiles (#356) - #383

Open
OCHI199 wants to merge 2 commits into
Neurowealth:mainfrom
OCHI199:feature/356-jurisdiction-wash-sale-harvest-export
Open

Add per-jurisdiction tax profiles (#356)#383
OCHI199 wants to merge 2 commits into
Neurowealth:mainfrom
OCHI199:feature/356-jurisdiction-wash-sale-harvest-export

Conversation

@OCHI199

@OCHI199 OCHI199 commented Aug 27, 2026

Copy link
Copy Markdown

Per-Jurisdiction Tax Profiles, Wash-Sale Detection, Harvesting Engine & US Tax Export

Summary

  • Added declarative per-jurisdiction tax profiles (US/UK/DE/AU/CA) covering tax-year boundaries, holding-period rules, loss-matching identifiers, allowances, and export format; buildTaxReport now resolves these from User.taxJurisdiction instead of a hard-coded UTC calendar year.
  • Added US wash-sale detection and disallowed-loss basis adjustment as a pure post-pass over the LotDisposal/CostBasisLot ledger.
  • Added a tax-loss-harvesting advisory engine that ranks open lots at an unrealized loss against year-to-date realized gains and flags wash-sale traps.
  • Added standards-compliant US tax export: Form 8949 CSV, Schedule D summary, and TurboTax TXF, built as pure formatters over the existing report.

Test plan

  • Unit tests for jurisdiction profile resolution and tax-year boundaries
  • Unit tests for wash-sale detection and basis adjustment
  • Unit tests for harvesting opportunity ranking
  • Unit tests for 8949/Schedule D/TXF formatters
  • npm run typecheck / npm run lint / npm test

Closes #356
Closes #355
Closes #354
Closes #353

Introduce a declarative TaxProfile per jurisdiction (US/UK/DE/AU/CA)
covering tax-year boundaries, holding-period thresholds and their
effect (rate split, flat discount, full exemption, or none), loss
matching rule identifier, flat annual allowance, and export format.
User.taxJurisdiction (default US) selects the profile; buildTaxReport
now resolves tax-year windows and long/short classification from it
instead of a hard-coded UTC calendar year, with US behavior unchanged
byte-for-byte.
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@OCHI199 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant